<template name="header">
    <nav class="navbar navbar-default" role="navigation">
        <div class="container-fluid">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navigation">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="{{pathFor 'postsList'}}">主页</a>
            </div>
            <div class="collapse navbar-collapse" id="navigation">
                <ul class="nav navbar-nav">
                    <!--if currentUser 只有登录后才显示添加数据连接，accounts包-->
                    {{#if currentUser}}
                        <li><a href="{{pathFor 'postSubmit'}}">添加数据</a></li>
                    {{/if}}
                </ul>
                <ul class="nav navbar-nav navbar-right">
                    <!--登陆菜单，外部模块-->
                    {{> loginButtons}}
                </ul>
            </div>
        </div>
    </nav>
</template>